Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor import paths in LexicalEditorState #6178

Merged
merged 2 commits into from May 31, 2024
Merged

Refactor import paths in LexicalEditorState #6178

merged 2 commits into from May 31, 2024

Conversation

ghost
Copy link

@ghost ghost commented May 27, 2024

[lexical] Refactor: Change import paths syntax in LexicalEditorState

Description

The current behavior implements not consistent import approaches which can lead to confusion.

This pull request addresses the issue by using consistent import syntax to make it easier to understand
which module is from where imported.

@ghost ghost requested review from zurfyx, fantactuka, acywatson, Fetz and ivailop7 as code owners May 27, 2024 17:33
Copy link

vercel bot commented May 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 3:31pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 3:31pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 27, 2024
Copy link

github-actions bot commented May 27, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 23.93 KB (0%) 479 ms (0%) 718 ms (+55.33% 🔺) 1.2 s
packages/lexical-rich-text/dist/LexicalRichText.js 34.59 KB (0%) 692 ms (0%) 1.4 s (-5.09% 🔽) 2.1 s
packages/lexical-plain-text/dist/LexicalPlainText.js 34.59 KB (0%) 692 ms (0%) 1.1 s (-11.11% 🔽) 1.8 s

Comment on lines 12 to 20
import type {SerializedElementNode} from './nodes/LexicalElementNode';
import type {SerializedRootNode} from './nodes/LexicalRootNode';

import invariant from 'shared/invariant';

import {$isElementNode, SerializedElementNode} from '.';

import {readEditorState} from './LexicalUpdates';
import {$getRoot} from './LexicalUtils';
import {$isElementNode} from './nodes/LexicalElementNode';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should auto sort upon saving if not try

./node_modules/.bin/eslint ./ --fix

import type {SerializedRootNode} from './nodes/LexicalRootNode';

import invariant from 'shared/invariant';

import {$isElementNode, SerializedElementNode} from '.';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: pls remove the extra line (tho auto fix should solve that)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the help!
The empty line is removed after saving, and the sorting was also done.
This sort outcome is the outcome from ESLint.

Copy link
Contributor

@potatowagon potatowagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ghost
Copy link
Author

ghost commented May 30, 2024

Thanks :)

@potatowagon potatowagon added this pull request to the merge queue May 31, 2024
Merged via the queue into facebook:main with commit bbcfd03 May 31, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants